API Documentation
Public Member Functions | List of all members
nkInputs::KeyboardDeviceManager Class Referencefinal

Manages the keyboard devices available in the component. More...

Inheritance diagram for nkInputs::KeyboardDeviceManager:

Public Member Functions

KeyboardDevicecreateOrRetrieve (const nkMemory::StringView &name)
 
KeyboardDeviceget (const nkMemory::StringView &name)
 
void rename (const nkMemory::StringView &currentName, const nkMemory::StringView &newName)
 
void erase (const nkMemory::StringView &name)
 

Detailed Description

Manages the keyboard devices available in the component.

At all times, manager owns any memory allocated inside. External code should never delete memory returned by it.

Member Function Documentation

◆ createOrRetrieve()

KeyboardDevice* nkInputs::KeyboardDeviceManager::createOrRetrieve ( const nkMemory::StringView name)

Creates if unavailable, or retrieves if available, a keybaord device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested, possibly freshly created. The manager owns the memory returned, external code should never delete it. See erase().

◆ get()

KeyboardDevice* nkInputs::KeyboardDeviceManager::get ( const nkMemory::StringView name)

Retrieves a keyboard device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested if available, nullptr else.

◆ rename()

void nkInputs::KeyboardDeviceManager::rename ( const nkMemory::StringView currentName,
const nkMemory::StringView newName 
)

Renames a keyboard device.

Parameters
currentNameThe name of the device to rename.
newNameThe name to reassign to the device.

◆ erase()

void nkInputs::KeyboardDeviceManager::erase ( const nkMemory::StringView name)

Erases and frees a keyboard device.

Parameters
nameThe name of the device to erase.

The documentation for this class was generated from the following file: